from pydantic_settings import BaseSettings

class Settings(BaseSettings):
  # Redis配置
    REDIS_HOST: str = "47.109.76.105"
    REDIS_PORT: int = 6379
    REDIS_DB: int = 0
    REDIS_PASSWORD: str = "HbXr9N2d0m82025S7r0ng"
    REDIS_MAX_CONNECTIONS: int = 10
    
    # MySQL配置
    MYSQL_HOST: str = "47.109.76.105"
    MYSQL_PORT: int = 3307
    MYSQL_USER: str = "root"
    MYSQL_PASSWORD: str = "Penguin52%26Camel%40River"
    MYSQL_DATABASE: str = "cloud-aiyun"
    MYSQL_CHARSET: str = "utf8mb4"
    
    # 应用配置
    APP_NAME: str = "AI智能体中心API服务"
    DEBUG: bool = False
    
    # JWT配置
    JWT_SECRET_KEY: str = "3r874cn7ewtr879n23trn978c34rx7j3r79qox7j7chgu8734r37ntfu"
    JWT_ALGORITHM: str = "HS256"
    JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
    JWT_LOGIN_SUBJECT: str = "caoyulin"
    
    # LLM配置
    LLM_MODEL_NAME: str = "qwen-plus"
    LLM_BASE_URL: str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
    LLM_API_KEY: str = "sk-ef90e00515e64e97b020a90d1c70d3f2"
    LLM_TEMPERATURE: float = 0.7
    LLM_STREAMING: bool = True


    class Config:
        env_file = ".env"
        case_sensitive = True

settings = Settings()